.class public final Llt/farmis/libraries/apps_promo/AppPromoDialog;
.super Landroidx/fragment/app/DialogFragment;
.source "AppPromoDialog.kt"


# instance fields
.field private _$_findViewCache:Ljava/util/HashMap;

.field private bigImageUrl:Ljava/lang/String;

.field private callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

.field private description:Ljava/lang/String;

.field public draw:Landroid/graphics/drawable/Drawable;

.field private isVideoCampaign:Z

.field private packageName:Ljava/lang/String;

.field public player:Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerView;

.field private smallImageUrl:Ljava/lang/String;

.field private title:Ljava/lang/String;

.field private videoId:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 25
    invoke-direct {p0}, Landroidx/fragment/app/DialogFragment;-><init>()V

    return-void
.end method

.method public static final synthetic access$getUriIntent(Llt/farmis/libraries/apps_promo/AppPromoDialog;Ljava/lang/String;)Landroid/content/Intent;
    .locals 0

    .line 25
    invoke-direct {p0, p1}, Llt/farmis/libraries/apps_promo/AppPromoDialog;->getUriIntent(Ljava/lang/String;)Landroid/content/Intent;

    move-result-object p0

    return-object p0
.end method

.method private final getUriIntent(Ljava/lang/String;)Landroid/content/Intent;
    .locals 2

    .line 96
    new-instance v0, Landroid/content/Intent;

    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

    const-string v1, "android.intent.action.VIEW"

    invoke-direct {v0, v1, p1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    return-object v0
.end method


# virtual methods
.method public _$_clearFindViewByIdCache()V
    .locals 1

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->_$_findViewCache:Ljava/util/HashMap;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/util/HashMap;->clear()V

    :cond_0
    return-void
.end method

.method public final getCallbacks()Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;
    .locals 1

    .line 26
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    return-object v0
.end method

.method public final getPackageName()Ljava/lang/String;
    .locals 1

    .line 31
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->packageName:Ljava/lang/String;

    return-object v0
.end method

.method public final getVideoId()Ljava/lang/String;
    .locals 1

    .line 33
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->videoId:Ljava/lang/String;

    return-object v0
.end method

.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
    .locals 8

    const-string p3, "inflater"

    invoke-static {p1, p3}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 38
    iget-object p3, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    if-eqz p3, :cond_0

    invoke-interface {p3}, Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;->onShow()V

    .line 40
    :cond_0
    sget p3, Llt/farmis/libraries/apps_promo/R$layout;->app_promo_dialog:I

    const/4 v0, 0x0

    invoke-virtual {p1, p3, p2, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    .line 41
    invoke-virtual {p0}, Landroidx/fragment/app/DialogFragment;->getDialog()Landroid/app/Dialog;

    move-result-object p2

    const-string p3, "dialog"

    invoke-static {p2, p3}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;

    move-result-object p2

    const/4 p3, 0x1

    invoke-virtual {p2, p3}, Landroid/view/Window;->requestFeature(I)Z

    .line 42
    invoke-virtual {p0}, Landroidx/fragment/app/DialogFragment;->getDialog()Landroid/app/Dialog;

    move-result-object p2

    invoke-virtual {p2, v0}, Landroid/app/Dialog;->setCanceledOnTouchOutside(Z)V

    .line 43
    sget p2, Llt/farmis/libraries/apps_promo/R$id;->appImageView:I

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p2

    check-cast p2, Landroid/widget/ImageView;

    .line 44
    sget v0, Llt/farmis/libraries/apps_promo/R$id;->launcher:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    .line 45
    sget v1, Llt/farmis/libraries/apps_promo/R$id;->appTitleTextView:I

    invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    .line 46
    sget v2, Llt/farmis/libraries/apps_promo/R$id;->appDescriptionTextView:I

    invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    .line 47
    sget v3, Llt/farmis/libraries/apps_promo/R$id;->installButton:I

    invoke-virtual {p1, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/Button;

    .line 48
    sget v4, Llt/farmis/libraries/apps_promo/R$id;->tryLaterButton:I

    invoke-virtual {p1, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/Button;

    .line 49
    sget v5, Llt/farmis/libraries/apps_promo/R$id;->youtube_player_view:I

    invoke-virtual {p1, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    const-string v6, "view.findViewById(R.id.youtube_player_view)"

    invoke-static {v5, v6}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    check-cast v5, Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerView;

    iput-object v5, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->player:Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerView;

    .line 50
    invoke-virtual {p2}, Landroid/widget/ImageView;->bringToFront()V

    .line 51
    invoke-virtual {v0}, Landroid/widget/ImageView;->bringToFront()V

    .line 53
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v5

    invoke-static {v5}, Lcom/bumptech/glide/Glide;->with(Landroidx/fragment/app/FragmentActivity;)Lcom/bumptech/glide/RequestManager;

    move-result-object v5

    iget-object v6, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->draw:Landroid/graphics/drawable/Drawable;

    const/4 v7, 0x0

    if-eqz v6, :cond_5

    invoke-virtual {v5, v6}, Lcom/bumptech/glide/RequestManager;->load(Landroid/graphics/drawable/Drawable;)Lcom/bumptech/glide/RequestBuilder;

    move-result-object v5

    invoke-virtual {v5, p2}, Lcom/bumptech/glide/RequestBuilder;->into(Landroid/widget/ImageView;)Lcom/bumptech/glide/request/target/ViewTarget;

    .line 54
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v5

    invoke-static {v5}, Lcom/bumptech/glide/Glide;->with(Landroidx/fragment/app/FragmentActivity;)Lcom/bumptech/glide/RequestManager;

    move-result-object v5

    iget-object v6, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->smallImageUrl:Ljava/lang/String;

    invoke-virtual {v5, v6}, Lcom/bumptech/glide/RequestManager;->load(Ljava/lang/String;)Lcom/bumptech/glide/RequestBuilder;

    move-result-object v5

    invoke-virtual {v5, v0}, Lcom/bumptech/glide/RequestBuilder;->into(Landroid/widget/ImageView;)Lcom/bumptech/glide/request/target/ViewTarget;

    const-string v0, "titleView"

    .line 56
    invoke-static {v1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->title:Ljava/lang/String;

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const-string v0, "descriptionView"

    .line 57
    invoke-static {v2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->description:Ljava/lang/String;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 59
    new-instance v0, Llt/farmis/libraries/apps_promo/AppPromoDialog$onCreateView$1;

    invoke-direct {v0, p0}, Llt/farmis/libraries/apps_promo/AppPromoDialog$onCreateView$1;-><init>(Llt/farmis/libraries/apps_promo/AppPromoDialog;)V

    invoke-virtual {v3, v0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 69
    new-instance v0, Llt/farmis/libraries/apps_promo/AppPromoDialog$onCreateView$2;

    invoke-direct {v0, p0}, Llt/farmis/libraries/apps_promo/AppPromoDialog$onCreateView$2;-><init>(Llt/farmis/libraries/apps_promo/AppPromoDialog;)V

    invoke-virtual {v4, v0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 73
    iget-boolean v0, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->isVideoCampaign:Z

    const-string v1, "player"

    if-eqz v0, :cond_3

    .line 74
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->player:Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerView;

    if-eqz v0, :cond_2

    sget v2, Llt/farmis/libraries/apps_promo/R$layout;->custom_player_ui:I

    invoke-virtual {v0, v2}, Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerView;->inflateCustomPlayerUI(I)Landroid/view/View;

    move-result-object v0

    .line 75
    new-instance v2, Lkotlin/jvm/internal/Ref$ObjectRef;

    invoke-direct {v2}, Lkotlin/jvm/internal/Ref$ObjectRef;-><init>()V

    iput-object v7, v2, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object;

    .line 76
    iget-object v3, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->player:Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerView;

    if-eqz v3, :cond_1

    new-instance v1, Llt/farmis/libraries/apps_promo/AppPromoDialog$onCreateView$3;

    invoke-direct {v1, p0, v2, v0, p2}, Llt/farmis/libraries/apps_promo/AppPromoDialog$onCreateView$3;-><init>(Llt/farmis/libraries/apps_promo/AppPromoDialog;Lkotlin/jvm/internal/Ref$ObjectRef;Landroid/view/View;Landroid/widget/ImageView;)V

    invoke-virtual {v3, v1, p3}, Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerView;->initialize(Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerInitListener;Z)V

    goto :goto_0

    :cond_1
    invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V

    throw v7

    .line 74
    :cond_2
    invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V

    throw v7

    .line 90
    :cond_3
    iget-object p2, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->player:Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerView;

    if-eqz p2, :cond_4

    const/16 p3, 0x8

    invoke-virtual {p2, p3}, Landroid/widget/FrameLayout;->setVisibility(I)V

    :goto_0
    return-object p1

    :cond_4
    invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V

    throw v7

    :cond_5
    const-string p1, "draw"

    .line 53
    invoke-static {p1}, Lkotlin/jvm/internal/Intrinsics;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V

    throw v7
.end method

.method public onDestroy()V
    .locals 1

    .line 107
    invoke-super {p0}, Landroidx/fragment/app/Fragment;->onDestroy()V

    .line 108
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->player:Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerView;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/pierfrancescosoffritti/youtubeplayer/player/YouTubePlayerView;->release()V

    return-void

    :cond_0
    const-string v0, "player"

    invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V

    const/4 v0, 0x0

    throw v0
.end method

.method public synthetic onDestroyView()V
    .locals 0

    invoke-super {p0}, Landroidx/fragment/app/DialogFragment;->onDestroyView()V

    invoke-virtual {p0}, Llt/farmis/libraries/apps_promo/AppPromoDialog;->_$_clearFindViewByIdCache()V

    return-void
.end method

.method public onStart()V
    .locals 3

    .line 99
    invoke-super {p0}, Landroidx/fragment/app/DialogFragment;->onStart()V

    .line 100
    invoke-virtual {p0}, Landroidx/fragment/app/DialogFragment;->getDialog()Landroid/app/Dialog;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 102
    invoke-virtual {v0}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;

    move-result-object v0

    const/4 v1, -0x1

    const/4 v2, -0x2

    invoke-virtual {v0, v1, v2}, Landroid/view/Window;->setLayout(II)V

    :cond_0
    return-void
.end method

.method public final setBigImageUrl(Ljava/lang/String;)V
    .locals 0

    .line 27
    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->bigImageUrl:Ljava/lang/String;

    return-void
.end method

.method public final setCallbacks(Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;)V
    .locals 0

    .line 26
    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->callbacks:Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;

    return-void
.end method

.method public final setDescription(Ljava/lang/String;)V
    .locals 0

    .line 30
    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->description:Ljava/lang/String;

    return-void
.end method

.method public final setDraw(Landroid/graphics/drawable/Drawable;)V
    .locals 1

    const-string v0, "<set-?>"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 35
    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->draw:Landroid/graphics/drawable/Drawable;

    return-void
.end method

.method public final setPackageName(Ljava/lang/String;)V
    .locals 0

    .line 31
    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->packageName:Ljava/lang/String;

    return-void
.end method

.method public final setSmallImageUrl(Ljava/lang/String;)V
    .locals 0

    .line 28
    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->smallImageUrl:Ljava/lang/String;

    return-void
.end method

.method public final setTitle(Ljava/lang/String;)V
    .locals 0

    .line 29
    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->title:Ljava/lang/String;

    return-void
.end method

.method public final setVideoCampaign(Z)V
    .locals 0

    .line 32
    iput-boolean p1, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->isVideoCampaign:Z

    return-void
.end method

.method public final setVideoId(Ljava/lang/String;)V
    .locals 0

    .line 33
    iput-object p1, p0, Llt/farmis/libraries/apps_promo/AppPromoDialog;->videoId:Ljava/lang/String;

    return-void
.end method
